package com.wx.sys.web;

import com.wx.sys.mapper.WxAccountMapper;
import com.wx.sys.model.WxAccount;
import com.wx.sys.service.WxAccountFeignApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by king-pc on 2018/12/6.
 */
@RestController
public class WxAccountFeignClient implements WxAccountFeignApi {

    @Autowired
    private WxAccountMapper wxAccountMapper;

    @Override
    public int addAccount(@RequestBody WxAccount wxAccount) {
        return wxAccountMapper.insert(wxAccount);
    }

    @Override
    public WxAccount getWxAccountByUserId(@RequestParam("userId") String userId) {
        return wxAccountMapper.getWxAccountByUserId(userId);
    }
}
